package com.authine.cloudpivot.ext.enums.demandpool;

/**
 * @ClassName DemandPoolStatusEnum
 * @Description: 需求池状态
 * @Author fj
 * @Date 2021/4/9
 * @Version V1.0
 **/
public enum DemandPoolStatusEnum {

    DEMAND_0_NEW("0", "新建"),

    DEMAND_1_APPROVE("1", "审核中"),

    DEMAND_2_APPROVE_NO("2", "已退回"),

    DEMAND_3_APPROVE_YES("3", "未执行"),

    DEMAND_4_INQUIRING("4", "已寻源"),//需求商品部分转询价或全部转询价且未转订单

    DEMAND_5_EXECUTE_PART("5", "部分执行"),//需求商品部分执行

    DEMAND_6_EXECUTE_ALL("6", "全部执行");//需求商品全部执行

    private String code;
    private String des;

    private DemandPoolStatusEnum(String code, String des) {
        this.code = code;
        this.des = des;
    }

    public String getCode() {
        return code;
    }

    public String getDes() {
        return des;
    }

    public static DemandPoolStatusEnum get(Number code) {
        for (DemandPoolStatusEnum c : DemandPoolStatusEnum.values()) {
            if (c.code.toString().equals(code.toString())) {
                return c;
            }
        }
        return null;
    }

}
